<template>
  <div style="border: 1px solid red; padding: 10px 20px">
    <h3>我是父组件: {{ count }}</h3>
    <ParentCom :count="count" @update="update" />
  </div>
</template>

<script setup>
import ParentCom from './components/ParentCom.vue';
import { ref } from 'vue';

const count = ref(10);

const emits = defineEmits(['update']);

const update = (e) => {
  count.value = e;
};
</script>
